#{extends '/template/main.html' /}
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">平台信息</h3>
        <div class="panel-options">
            <a href="#" data-toggle="panel">
                <span class="collapse-icon">&ndash;</span>
                <span class="expand-icon">+</span>
            </a>
        </div>
    </div>
    <div class="panel-body">

        <form method="POST" role="form" action="/manage/orderSource/OrderSourceCtrl/saveDetail" class="form-horizontal validate">
            <input id="idOrderSource" name="orderSource.id" value="${orderSource.id}" type="hidden">
            <input id="idPageNumber" name="pageNumber" value="${pageNumber}" type="hidden">
            <div class="form-group">
                <label class="col-sm-2 control-label" for="idCode">编号</label>

                <div class="col-sm-10">
                    <input type="text" name="orderSource.code" class="form-control" id="idCode" placeholder="编号自动生成"
                           readonly value="${orderSource?.code}">
                </div>
            </div>

            <div class="form-group-separator"></div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="idName">名称</label>

                <div class="col-sm-10">
                    <input type="text" name="orderSource.name" class="form-control" id="idName" placeholder="请填写平台名称"
                           data-validate="required" value="${orderSource?.name}">
                </div>
            </div>

            <div class="form-group-separator"></div>

            <div class="form-group">
                <label class="col-sm-2 control-label" for="idremark">备注</label>

                <div class="col-sm-10">
                    <textarea class="form-control" cols="5" id="idremark" name="orderSource.remark" placeholder="请输入备注">${orderSource?.remark}</textarea>
                </div>
            </div>


            <div class="form-group-separator"></div>

            <div class="form-group">
                <label class="col-sm-2 control-label" for="field-5"></label>

                <div class="col-sm-10">
                    <button type="submit" class="btn btn-success">&nbsp;&nbsp;保存&nbsp;&nbsp;</button>
                    <button id="idReset" type="reset" class="btn btn-white">&nbsp;&nbsp;重置&nbsp;&nbsp;</button>
                </div>

            </div>

        </form>

    </div>
</div>

<!-- Imported styles on this page -->
<link rel="stylesheet" href="/public/js/wysihtml5/src/bootstrap-wysihtml5.css">
<link rel="stylesheet" href="/public/js/uikit/vendor/codemirror/codemirror.css">
<link rel="stylesheet" href="/public/js/uikit/uikit.css">
<link rel="stylesheet" href="/public/js/uikit/css/addons/uikit.almost-flat.addons.min.css">
<script src="/public/js/wysihtml5/lib/js/wysihtml5-0.3.0.js"></script>
<!-- Imported scripts on this page -->
<script src="/public/js/wysihtml5/src/bootstrap-wysihtml5.js"></script>
<script src="/public/js/uikit/vendor/codemirror/codemirror.js"></script>
<script src="/public/js/uikit/vendor/marked.js"></script>
<script src="/public/js/uikit/js/uikit.min.js"></script>
<script src="/public/js/uikit/js/addons/htmleditor.min.js"></script>
<script src="/public/js/ckeditor/ckeditor.js"></script>
<script src="/public/js/ckeditor/adapters/jquery.js"></script>

<!-- Imported scripts on this page -->
<script src="/public/js/jquery-validate/jquery.validate.min.js"></script>
<script>
    var id = '${id}';
    $(function () {
        // 提示
        var msg = '${flash.get("msg")}';
        if(msg) {
            saveSuccess(msg);
        }

        //修改页面,隐藏充值按钮
        if(id > 0){
            $('#idReset').hide();
        }
    })


</script>